<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path_part = request.getContextPath();
	String basePathter = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path_part + "/";
%>
<div class="wbs_scroll" style="height:23px;">
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview">
		<thead>
			   <tr class="title">
                     <td style="width: 3%">序号</td>
                    <td style="width: 6%">出差人</td>
                    <td style="width: 7%">开始时间</td>
                    <td style="width: 7%">结束时间</td>
                    <td style="width: 3%">时长</td>
                    <td style="width: 24%">出差原因</td>
                    <td style="width: 8%">出差金额</td>
                    <td style="width: 12%">出差礼品</td>
                    <td style="width: 8%">审批状态</td>
                    <td style="width: 13%">备注</td>
	           </tr>
		</thead>
	</table>
</div>
<div class="wbs_scroll" style="height:396px;" >
	<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview" id="sale_saleChance_table">
		<tbody class="mytbody">
			<s:if test="tripListData.size()==0">
	          		<tr>
	          			<td colspan="2" align="center">无记录</td>
	          		</tr>
	        </s:if>
	        <s:else>
	             <s:iterator value="tripListData" status="stat">
	              <tr>
	                 <td style="width: 3%"><s:property value="#stat.count"/></td>
	                  <td style="width: 6%"><s:property value="entryUserName"/></td>
	                  <td style="width: 7%"><s:property value="beginDate"/></td>
	                  <td style="width: 7%"><s:property value="endDate"/></td>
	                  <td style="width: 3%"><s:property value="sumTime"/></td>
	                  <td style="width: 24%"><s:property value="reson"/></td>
	                  <td style="width: 8%"><s:property value="tripMoney"/></td>
	                  <td style="width: 12%"><s:property value="giftName"/></td>
	                  <td style="width: 8%"><s:property value="stateName"/></td>
	                  <td style="width: 13%">
	                  	<s:if test="stopDate != null">
	                  		<s:property value="stopDate"/>结束出差。<br/>原因：<s:property value="stopReson"/>
	                  	</s:if>
	                  </td>
	              </tr>
	             </s:iterator>
	        	</s:else>
		</tbody>
	</table>
	<%@include file="../../../common/jsp/pageing.jsp" %>
</div>
<script>
	// 文本超过8个字符数时，用省略显示
		text_overflow( 10 );
	 	//查询方法
		function searchLeaveBySearchKey(){
			var name = document.getElementById("condition.beginDate").value;
			loadContent('_econTargetList_div_id','leaveAction!findAllLeave.action?condition.beginDate='+name , function(){
			setGridCss();
			})
		}
        // 分页
		function gotoPage( pageNo , totalPage , pageSize ){
			// 按page的信息加载数据
			// 如果当前页大于了最大页数就弹出警告
			if( pageNo > totalPage ){
				window.alert( '总页数为'+totalPage+' , 请重新输入页码!' );
				return;
			}
			// 加载数据
			loadContent( '_econTargetList_div_id' , 'leaveAction!listLeaveByPage.action?page.pageNo='+pageNo+'&page.totalPage='+totalPage+'&page.pageSize='+pageSize+'&condition.beginDate=<s:property value="condition.beginDate"/>',function() {setGridCss();setGridOddEvenCss();} );
		}
</script>